void main() {
  // 创建男人对象
  Man man = Man('李雷', 13, ['二蛋', '三娃']);
  print(man.friends);
  man.eat();
  man.playGame();

  // 创建女人对象
  Woman woman = Woman('韩梅梅', 14);
  print(woman.name);
  woman.eat();
}

/// 父类
class Person {
  Person(this.name, this.age);

  String? name;
  int? age;

  void eat() {
    print('$name -- eat');
  }
}

/// 男人类
class Man extends Person {
  Man(super.name, super.age, this.friends);
  List friends;

  void playGame() {
    print('$name在打游戏');
  }
}

/// 女人类
class Woman extends Person {
  Woman(super.name, super.age);
}
